using System.Windows;

namespace PatentAssistant
{
    /// <summary>
    /// PolishDialog.xaml 的交互逻辑
    /// </summary>
    public partial class PolishDialog : Window
    {
        /// <summary>
        /// 原始文本
        /// </summary>
        public string Original { get; }
        
        /// <summary>
        /// 润色后的文本
        /// </summary>
        public string Polished { get; }
        
        /// <summary>
        /// 是否使用润色后的文本
        /// </summary>
        public bool UsePolished { get; private set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="original">原始文本</param>
        /// <param name="polished">润色后的文本</param>
        public PolishDialog(string original, string polished)
        {
            InitializeComponent();
            Original = original;
            Polished = polished;
            DataContext = this;
        }

        /// <summary>
        /// 使用润色后的文本
        /// </summary>
        private void UsePolished_Click(object sender, RoutedEventArgs e)
        {
            UsePolished = true;
            DialogResult = true;
        }

        /// <summary>
        /// 保留原文
        /// </summary>
        private void KeepOriginal_Click(object sender, RoutedEventArgs e)
        {
            UsePolished = false;
            DialogResult = true;
        }
    }
} 